﻿namespace MiniJob.Worker.Runtime;

public class MiniJobRuntimeOptions
{
    /// <summary>
    /// 接入应用名称
    /// </summary>
    public string AppName { get; set; } = string.Empty;

    /// <summary>
    /// 调度服务器地址，IP:Port 或 域名，多值逗号分隔
    /// </summary>
    public string ServerAddress { get; set; } = string.Empty;

    /// <summary>
    /// 当前执行器地址，IP:port
    /// </summary>
    public string WorkerAddress {  get; set; } = string.Empty;

    /// <summary>
    /// Worker 端口
    /// </summary>
    public int Port { get; set; }

    /// <summary>
    /// Worker 建康上报频率
    /// </summary>
    public int HealthReportInterval { get; set; } = 10;

    /// <summary>
    /// Worker 标签
    /// </summary>
    public string? Tag { get; set; }

    public JobRegistrationCollection Jobs { get; } = [];
}
